1. Technical Field
The present invention relates in general to data processing systems and in particular to a processor in a data processing system. More particularly, the present invention relates to processing string and multiple load/store instructions.
2. Description of the Related Art
String instructions are data structures that consist of xe2x80x9cmultiples,xe2x80x9d which are instructions that are subsets of string instructions. The multiples"" size is measured in half word, word or word lengths and typically, the multiples within the string require sequencing for appropriate processing. String instructions, as a whole, present a problem for Reduced instruction set computer (xe2x80x9cRISCxe2x80x9d) processors. Because of the architecture, RISC processors utilize a relatively small set of fundamental instructions and repeat that set of instructions at a high clock frequency. Though RISC processors process only a limited set of fundamental instructions (hereinafter referred to as elements), string instructions, which have varying lengths, are comprised of multiple fundamental instructions and must be broken down to the fundamentals and processed sequentially by the RISC processor.
RISC processors are employed in many data processing systems and are generally characterized by high throughput of instructions. RISC processors usually operate at a high clock frequency and because of the minimal instruction set do so very efficiently. In addition to high clock speed, processor efficiency is improved even more by the inclusion of multiple execution units allowing the execution of two, and sometimes more, instructions per clock cycle. RISC processors are frequently employed as core processing xe2x80x9cenginesxe2x80x9d to larger more complex processors.
Processors with the ability to execute multiple instructions per clock cycle are described as xe2x80x9csuperscalar.xe2x80x9d Superscalar processors, such as the PowerPC(trademark) family of processors available from IBM Corporation of Armonk, N.Y., provide simultaneous dispatch of multiple instructions. Included in the processor are an Instruction Cache (xe2x80x9cICxe2x80x9d), an Instruction Dispatch Unit (xe2x80x9cIDUxe2x80x9d), an Execution Unit (xe2x80x9cEUxe2x80x9d) and a Completion Unit (xe2x80x9cCUxe2x80x9d). Generally, a superscalar, RISC processor is xe2x80x9cpipelined,xe2x80x9d meaning that a second instruction is waiting to enter the execution unit as soon as the previous instruction is finished.
In a superscalar processor, instruction processing is usually accomplished in six stagesxe2x80x94fetch, decode, dispatch, execute, writeback and completion. The fetch stage is primarily responsible for fetching instructions from the instruction cache and determining the address of the next instruction to be fetched. The decode stage generally handles all time-critical instruction decoding for instructions in the instruction buffer. The dispatch stage is responsible for non-time-critical decoding of instructions supplied by the decode stage and for determining which of the instructions can be dispatched in the current cycle.
The execute stage executes the instruction selected in the dispatch stage, which may come from the reservation stations or from instructions arriving from dispatch. The completion stage maintains the correct architectural machine state by considering instructions residing in the completion buffer and utilizing information about the status of instructions provided by the execute stage. The write back stage is used to write back-any information from the rename buffers that is not written back by the completion stage.
A processor utilizing a RISC processor core is restricted by the limitations of a RISC processor; i.e. minimal instruction length and limited instruction set. The RISC processor core requires that strings and multiples be broken down into a series of simple load or store operations. The RISC processor handles variable length string and multiple load/store instructions by routing each string instruction to the functional unit that executes it, i.e., a load store unit, and the functional unit has to internally recognize this as a string instruction. A problem with this method is the instruction is sequentially executed through a single functional (i.e., load/store) unit, even though there are multiple functional units in a RISC processor. The functional unit must internally break the instruction into smaller instructions before executing each instruction sequentially.
It would be desirable therefore, to provide a method and apparatus that would increase the speed of handling variable length streams of string instructions.
It is therefore one object of the present invention to provide a method and system that allows for variable length streams of load or store instructions in a RISC processor.
It is another object of the present invention to provide a method and system for converting variable length instructions-into operations usable by a RISC processor.
The foregoing objects are achieved as is now described. A generalized, programmable dataflow state-machine is provided to receive information about a particular string instruction. The string instruction is parsed into all the functions contained in the string instruction. The functions that make up the string instruction are routed to parallel functional units and executed. The state-machine manipulates the size of the functions in the string instruction and whether or not instructions (internal operations) need to be generated.
The above as well as additional objects, features, and advantages of the present invention will become apparent in the following detailed written description.